<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org"
	xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<title>统一作战平台</title>
<link th:href="@{/ajax/libs/jquery-layout/jquery.layout-latest.css}" rel="stylesheet"/>

<body class="gray-bg">
	<div class="container-div ui-layout-center">
		<div class="row">
			<div class="col-sm-12 search-collapse">
				<form id="hc-form">
					<div class="select-list">
						<ul>
							<li>
								考核周期：
								<select id="checkPeriod"  name="checkPeriod"  style="width: 100px" th:with="type=${@dict.getType('check_period')}">
									<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" ></option>
								</select>
							</li>
							<!--<li>
								流失分类：
								<select id="turnoverType"  name="turnoverType"  style="width: 100px" th:with="type=${@dict.getType('turnover_type')}">
									<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" ></option>
								</select>
							</li>-->
							<li>
								考核单元：
								<select id="checkPdu"  name="checkPdu"  style="width: 100px" th:with="type=${@dict.getType('check_unit')}">
									<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" ></option>
								</select>
							</li>
							<li>
								交付部：
								<select id="deliverDept"  name="deliverDept"  style="width: 100px" th:with="type=${@dict.getType('deliver_dept_type')}">
									<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" ></option>
								</select>
							</li>
							<li>
								PDU：
								<select id="pdu"  name="pdu"  style="width: 100px" th:with="type=${@dict.getType('human_pdu')}">
									<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" ></option>
								</select>
							</li>
							<li>
								地域：
								<select id="region"  name="region"  style="width: 100px" th:with="type=${@dict.getType('check_region')}">
									<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" ></option>
								</select>
							</li>


							<li>
								<a class="btn btn-success btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
							    <a class="btn btn-success btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
							</li>
						</ul>
					</div>

				</form>
			</div>

	        <div class="col-sm-12 select-table table-striped">
			    <table id="bootstrap-table" data-mobile-responsive="true"></table>
			</div>
		</div>
	</div>
	<div th:include="include :: footer"></div>
	<script th:src="@{/ajax/libs/jquery-layout/jquery.layout-latest.js}"></script>
	<script th:src="@{/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.all-3.5.js}"></script>
	<script th:inline="javascript">
		var editFlag = [[${@permission.hasPermi('human:turnover:edit')}]];
		var removeFlag = [[${@permission.hasPermi('human:turnover:remove')}]];
		var datas = [[${@dict.getType('check_region')}]];
		var pduDatas = [[${@dict.getType('human_pdu')}]];
		var checkPduDatas = [[${@dict.getType('check_unit')}]];
		var turnover_type=[[${@dict.getType('turnover_type')}]];
		var prefix = ctx + "human/turnover";

		//年月范围
		layui.use('laydate', function(){
		var laydate = layui.laydate;
		  laydate.render({
			elem: '#test8'
			,type: 'month'
			,theme: 'molv'
			,range: true,
			done: function(value, date) {
				var months = value.split(" - ");
			}
		  });
		 });

		$(function() {
			$('body').layout({ west__size: 185 });
			queryWorktimeList();
		});


		function queryWorktimeList() {
		    var options = {
		        url: prefix + "/list",
		        //createUrl: prefix + "/add",
		        updateUrl: prefix + "/edit/{id}",
		        //removeUrl: prefix + "/
		        modalName: "turnover",
		        search: true,
		        showExport: false,
		        columns: [
		       	{field: 'name',title: '姓名'},
				{field: 'sex',title: '性别'},
				{field: 'id',title: '身份证号'},
				  {field: 'checkPeriod',title: '考核周期'},
				{field: 'wbCode',title: '外包人员服务编号'},
				{field: 'isoftId',title: '蚂蚁工号'},
				//{field: 'cu',title: '蚂蚁部门'},
				{field: 'locDept',title: '看护部门'},
				{field: 'checkUnit',title: '考核单元'},
				{field: 'deliverDept',title: '交付部'},
				{field: 'currentStatus',title: '当前状态'},
				{field: 'prjPo',title: '项目PO'},
				{field: 'prjPr',title: '项目PR'},
				{field: 'prjNo',title: '项目编号'},
				//{field: 'prjName',title: '项目名称'},
				{field: 'partnerName',title: '供应商名称'},
				//{field: 'deptName',title: '部门名称'},
				{field: 'bg',title: 'BG'},
				{field: 'bu',title: 'BU'},
				{field: 'pdu',title: 'PDU'},
				{field: 'region',title: '地域'},
				{field: 'hwLevel',title: '职级'},
				{field: 'levelType',title: '职级类型'},
				{field: 'levelDate',title: '职级认证时间'},
				{field: 'isBackbone',title: '是否骨干员工'},
				{field: 'partnerMode',title: '合作模式'},
				{field: 'hwPm',title: '华为PM'},
				{field: 'inputType',title: '入项类型'},
				{field: 'leaveType',title: '离职类型'},
				{field: 'leaveDate',title: '离职时间'},
				{field: 'leaveReason',title: '离职原因'},
				{field: 'releaseDate',title: '释放时间'},
				{field: 'releaseReason',title: '释放原因'},
				{field: 'hwAccount',title: '华为域账号/W3账号'},
				{field: 'account',title: '华为账号责任人'},
				{field: 'post',title: '岗位'},
				{field: 'skill',title: '技能'},
				{field: 'personCategory',title: '人员类别'},
				{field: 'isDevDept',title: '是否研发部门'},
				{field: 'education',title: '学历'},
				{field: 'graduationTime',title: '毕业时间'},
				{field: 'firstEnterHwTime',title: '第一次进入华为时间'},
				{field: 'colleges',title: '毕业院校'},
				{field: 'isUnifiedRecruitment',title: '是否统招'},
				{field: 'is211',title: '是否211院校'},
				{field: 'major',title: '专业'},
				{field: 'isOnshore',title: '是否在岸'},
				{field: 'officeSpace',title: '办公场地'},
				{field: 'partnerPm',title: '供应商PM'},
				{field: 'product',title: '产品'},
				//{field: 'prjTeam',title: '项目组'},
				{field: 'remark',title: '备注'},
				{field: 'createTime',title: '创建时间'},

				]
		    };
		    $.table.init(options);
		}

		function showGooseFile(gooseFile){
			var bigH = 450;
			var bigW = 900;
			if(gooseFile===null||gooseFile==='null'){
				layer.open({content: "未上传Goose截图."});
				return;
			}
			layer.open({
				type: 1,
				title: false,
				closeBtn: 1,
				shadeClose: true,
				area: [bigW + 'px', bigH + 'px'], //宽高
				content: "<img width='"+bigW+"' height='"+bigH+"' src=/goose/" + gooseFile + " />"
			});
		}


		function edit(hcId) {
			var roleId = $("input[name='roleId']").val();
			var roleName = $("input[name='roleName']").val();
			var roleKey = $("input[name='roleKey']").val();
			var roleSort = $("input[name='roleSort']").val();
			var status = $("input[name='status']").is(':checked') == true ? 0 : 1;
			var remark = $("input[name='remark']").val();
			var menuIds = $.tree.getCheckedNodes();
			$.ajax({
				cache : true,
				type : "POST",
				url : ctx + "human/turnover/edit",
				data : {
					"roleId": roleId,
					"roleName": roleName,
					"roleKey": roleKey,
					"roleSort": roleSort,
					"status": status,
					"remark": remark,
					"menuIds": menuIds
				},
				async : false,
				error : function(request) {
					$.modal.alertError("系统错误");
				},
				success : function(data) {
					$.operate.saveSuccess(data);
				}
			});
		}


	</script>
</body>
</html>